package com.ds.smartstudio.mapper;

import com.ds.smartstudio.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yangsf
 * @since 2022-07-02 10:42:24
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("select count(ds_user_name) from ds_user where ds_user_name like CONCAT('%',#{name},'%')")
    Integer selectTotalByName(String name);

    @Select("select count(ds_user_name) from ds_user where ds_user_role = 1")
    Integer countAdmin();
}
